#include "render.h"

void Render::SetUp3DView()
{

	glMatrixMode( GL_PROJECTION );
  	glLoadIdentity();
  
  	gluPerspective( VIEW_FOV, ( GLfloat )SCREEN_WIDTH / ( GLfloat )SCREEN_HEIGHT, 0.1f, VIEW_DEPTH );
  
  	glMatrixMode( GL_MODELVIEW );
  	glLoadIdentity();
	
	glEnable( GL_DEPTH_TEST );
	glDepthFunc( GL_LEQUAL );
	
	glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );

}

void Render::SetUp2DView()
{

	glMatrixMode( GL_PROJECTION );
  	glLoadIdentity();
  
  	gluOrtho2D( 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0 );

  	glMatrixMode( GL_MODELVIEW );
  	glLoadIdentity();

}